Customizing HTML templates

If you know HTML and CSS, you can make your own HTML templates for exporting:
Choose Customize HTML Templates from the File menu.
Enter a name for the template and save it to the ~/Library/Application Support/OmniPlan/HTMLTemplates/ folder, which is the default location. Note that you can also save to the same location in the Library of the computer you are using, or the Library of the network you are on, to make the template available to others.
The new template opens in Finder; it is a folder of HTML and CSS files that you can customize to your liking.
The HTML templates use a special syntax for inserting data from the project. Open one of the HTML files in the text editor of your choice, and you'll find standard XHTML interspersed with OmniPlan tokens that look like this:
{@Token Name@}
These tokens are placeholders for data about the project as a whole. When the template is used to export an OmniPlan file, each token is replaced by the data corresponding to the token name.
Project tokens
{@Date@} — The date of the export.
{@Version@} — The version of OmniPlan that exported the report.
{@Project Title@} — The title of the project, as set in the Project Information inspector.
{@StartDate@}, {@EndDate@} — The start or end date of the project.
{@StartTime@}, {@EndTime@} — The start or end time of the project.
{@Duration@} — The duration of the whole project.
{@Completion@} — The completion percentage of the whole project, as calculated from all tasks.
{@Cost@} — The cost of the whole project.
{@ResourceData@} — Place this at the <tr> level of a table; for each resource it creates a row of three cells, containing the resource name, a link to an iCalendar file of the resource's assignments as events, and a link to an iCalendar file of the resource's assignments as to-do items.
{@ProjectCalendarLink@} — A link to the Project Milestones calendar, if there are any milestones.
Stylesheet token
{@ApplyStyleSheet include/style.css@}This token applies a CSS stylesheet to the page, by specifying the path to the stylesheet. When the export happens, this token is replaced by one of two things:
If exporting a full HTML report, a link to the stylesheet as an external file. This lets all of the exported HTML files link to the same stylesheet. <link rel="stylesheet" href="include/style.css" type="text/css" />
If exporting just one HTML page (a task list or resource list), an embedded copy of the stylesheet. This keeps everything in one HTML file. <style type="text/css"> [...] </style>
Loop tokens
These work like open/close HTML or XML tags. When the export happens, OmniPlan cycles through everything between the opening and closing tokens, inserting data about each task or resource. The Assignments loop has to happen inside the Resources loop, as it lists tasks that are assigned to a particular resource. Make sure that you include the closing token, and that your task-specific or resource-specific tokens are between the appropriate loop tokens.
{@Tasks@} and {@/Tasks@} — Lists all tasks in the export; inside this loop you can use task-specific tokens.
{@Resources@} and {@/Resources@} — Lists all resources in the project; inside this loop you can use resource-specific tokens and Assignments loops.
{@Assignments@} and {@/Assignments@} — Lists all assigned tasks for a resource; this can only be used inside the Resources loop. Inside this loop you can use task-specific tokens.
Tokens for tasks
These tokens can be used inside the Tasks loop or the Assignments loop of a resource.
{@ID@} — The task's number in the outline.
{@Title@} — The task name.
{@Start@}, {@End@} — Actual start or end time of the task.
{@Time@} — Duration of the task.
{@Effort@} — Effort value for the task.
{@%Done@} — Completion percentage for the task.
{@Dependencies@} — A list of the task's dependencies, in the same format as the Dependencies column in the task outline.
{@Cost@} — Cost of the task itself.
{@Resources Cost@} — Cost of the assigned resources.
{@Total Cost@} — Cost of the task and the assigned resources.
{@Assigned@} — A list of assigned resources.
{@Planned Start@}, {@Planned End@} — Baseline start or end time of the task.
{@Start Variance@}, {@End Variance@} — Difference between the baseline and actual times for the start or end of the task.
{@Constraint Start@}, {@Constraint End@} — Constraint on the task's start or end time, if any.
{@Notes@} — Text of the task's note, if any.
{@Priority@} — Task priority, just like the column in the task outline.
{@Status@} — Some words to describe the task's due or overdue state, like the Status icons in the task outline.
{@Violations@} — Number of violations that involve this task.
Custom data keys — If you include a token that exactly matches the name of one of your custom data keys, it is converted to the value of that key for the given task. For example, if you have a "Location" key for your tasks, you can use a {@Location@} token in your template.
Tokens for resources
These tokens can be used inside the Resources loop.
{@Resource@} — The resource name.
{@Start@}, {@End@} — Actual start time of the resource's earliest assignment, or end time of the resource's latest assignment.
{@Time@} — Total duration of all tasks assigned to the resource.
{@%Done@} — Completion percentage of all tasks assigned to the resource.
{@Resources Cost@} — Total cost of assigning this resource to its assigned tasks.
{@Resource Type@} — The type of resource (Staff, Equipment, or Material).
{@#@} — Total units value of the resource.
{@Notes@} — Text of the resource's note, if any.
{@IM@} — Resource's instant messaging account name, if any.
{@Efficiency@} — Resource's efficiency value.
{@Cost/Use@}, {@Cost/Hour@} — Cost per use and cost per hour values as defined in the Resource Information inspector.
{@Total Uses@}, {@Total Hours@} — Total number of assignments, or total amount of effort assigned, for the resource.
{@ResourceCalendarLink@} — A link to the resource's assigned tasks as an iCalendar file of events, if it has any tasks assigned.
{@ResourceToDoLink@} — A link to the resource's assigned tasks as an iCalendar file of to-do items, if it has any tasks assigned.
Custom data keys — If you include a token that exactly matches the name of one of your custom data keys, it is converted to the value of that key for the given resource. For example, if you have a "Phone Number" key for your resources, you can use a {@Phone Number@} token in your template.
Path tokens
These provide the path to a particular page in the HTML export. You can use these to create links between pages; for example: <a href="file:{@TaskReportPath@}">
{@TaskReportPath@} — The file path to this HTML export's Task Report page.
{@ResourceReportPath@} — The file path to this HTML export's Resource Report page.
{@ResourceTimelinePath@} — The file path to this HTML export's Resource Timeline image.
{@GanttChartPath@} — The file path to this HTML export's Gantt Chart image.
{@ProjectCalendarPath@} — The file path to this HTML export's Project Milestones calendar.
← Microsoft Project support Accessing tasks and resources by URL →